#ifndef _BUSOPERATION_H_
#define _BUSOPERATION_H_
#include "basedef.h"

#define PACK_NO_PADDING  __attribute__ ((__packed__))
#define MAXCARDID 10
#define WAITOPERATE 1
#define OVEROPERATE 2
#define IDLESTATE   0

#define ONBUS  1
#define OUTBUS 2


typedef struct
{
	u8  Osdflag;
	u8  Msgsndflag;
	u8  cardstatue;
	u16 CardId;
}PACK_NO_PADDING IDCardInfo;

typedef struct
{
	IDCardInfo Cardque[MAXCARDID];
	u8 currdirection;
	u8 CurrUseIndex;
	u8 CurrAddindex;
	u8 MaxQueID;
}PACK_NO_PADDING CardWorkQue;

void Swipe_Record(void *arg);
int Cardmatch(u32 CardID,char *out_name,char * out_phoneNum,int IDstatus);
void match_searchInfor(void *arg);


#endif

